package ysc.cqnu.operdb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import ysc.cqnu.operdb.entity.ReceiveUserInfo;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.service.UserUpdatePasswordFindService;

@CrossOrigin
@Controller
@ResponseBody
public class UpdatePasswordFindController {
    @Autowired
    private ResultData resultData;
    @Autowired
    private UserUpdatePasswordFindService userUpdatePasswordFindService;

    @RequestMapping(value = "/updatepasswordfind",method = RequestMethod.POST)
    public ResultData updatepasswordfind(@RequestBody ReceiveUserInfo receiveLogin){
        System.out.println("修改密码前端已连接");
        resultData = userUpdatePasswordFindService.updatePassword(receiveLogin);
        return resultData;
    }
}
